package cn.cstech.aijia.ui.service;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import cn.cstech.aijia.R;
import cn.cstech.aijia.ui.adapter.DesignerListAdapter;
import cn.cstech.aijia.ui.base.BaseActivity;

/**
 * Created by xi on 15/9/11.
 */
public class CompanyListActivity extends BaseActivity {

    private ListView listView;
    private DesignerListAdapter adapter;
    private List<String> list;

    @Override
    protected void onCreate(Bundle arg0) {
        super.onCreate(arg0);
        setContentView(R.layout.ac_company_list);

        listView = (ListView) findViewById(R.id.listView);
        list = new ArrayList<String>();
        list.add("");
        adapter = new DesignerListAdapter(this,list);
        listView.setAdapter(adapter);

        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Intent intent = new Intent(CompanyListActivity.this, CompanyDetailActivity.class);
                startActivity(intent);
            }
        });
    }

    @Override
    protected void onTitleBarCreate() {
        super.onTitleBarCreate();
        setTitleText("同城装饰公司");
        setLeftImageView(R.drawable.arrow_back, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }
}
